var t = getApp();

Component({
    properties: {
        keywork: {
            type: null
        },
        memberId: {
            type: null
        }
    },
    data: {
        strUrl: "plugin.wechat-chat-sidebar.frontend.controller.customer.cart.index",
        cartList: [],
        loading: !1,
        finished: !0
    },
    lifetimes: {
        attached: function() {
            var t = wx.getStorageSync("langIndex");
            this.setData({
                language: t.en
            }), this.getData();
        }
    },
    methods: {
        getData: function() {
            var e = this, a = {};
            "customer" == this.data.keywork && (this.data.strUrl = "plugin.customer-center.frontend.controllers.customer.cart.index", 
            a.member_id = this.data.memberId);
            var r = t.getNetAddresss(this.data.strUrl);
            t._postNetWork({
                url: r,
                data: a,
                success: function(t) {
                    var a = t.data;
                    1 == a.result ? e.setData({
                        cartList: a.data.list
                    }) : wx.showToast({
                        icon: "none",
                        title: a.msg,
                        duration: 1500
                    });
                },
                fail: function(t) {
                    console.log(t);
                }
            });
        }
    }
});